﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>

<!DOCTYPE html>
<html>
<head> 
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
        <asp:Literal ID="lblTitle" runat="server"></asp:Literal>
        | 登入</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="/reference/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="/reference/plugins/font-awesome/css/font-awesome.min.css" />
    <!-- Ionicons -->
    <link rel="stylesheet" href="/reference/plugins/ionicons/css/ionicons.min.css" />
    <!-- Theme style -->
    <link rel="stylesheet" href="/reference/dist/css/AdminLTE.min.css">
    <!-- iCheck -->
    <link rel="stylesheet" href="/reference/plugins/iCheck/square/blue.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="shortcut icon" href="/favicon.ico" />
</head>
<body class="hold-transition login-page">
    <div class="login-box">
        <div class="login-logo">
            <a><b>
                <asp:Literal ID="lblSYSName" runat="server"></asp:Literal></b></a>
        </div>
        <!-- /.login-logo -->
        <div class="login-box-body">
            <form runat="server">
                <div class="form-group has-feedback">
                    <asp:TextBox ID="txtUserName" CssClass="form-control" runat="server" placeholder="用户名"></asp:TextBox>
                    <span class="glyphicon glyphicon-user form-control-feedback"></span>
                </div>
                <div class="form-group has-feedback">
                    <asp:TextBox ID="txtPassword" CssClass="form-control" TextMode="Password" runat="server" placeholder="密码"></asp:TextBox>
                    <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                </div>
                <div class="row">
                    <div class="col-xs-8">
                        <asp:Label ID="lblmsg" CssClass="text-danger" runat="server"></asp:Label>
                    </div>
                    <!-- /.col -->
                    <div class="col-xs-4">
                        <asp:Button ID="btnLogin" CssClass="btn btn-primary btn-block btn-flat" runat="server" Text="登入" OnClientClick="return checkNull()" OnClick="btnLogin_Click" />
                    </div>
                    <!-- /.col -->
                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
                </div>
            </form>
        </div>
    </div>
    <!-- /.login-box -->

    <!-- jQuery 2.1.4 -->
    <script src="/reference/plugins/jQuery/jQuery-2.2.4.min.js"></script>
    <!-- Bootstrap 3.3.5 -->
    <script src="/reference/bootstrap/js/bootstrap.min.js"></script>
    <script>
        function checkNull() {
            var account = $("#txtUserName").val();
            var pwd = $("#txtPassword").val();
            if (account.trim() == "" || pwd.trim() == "") {
                $("#lblmsg").text("用户名或密码不能为空");
                return false;
            }
            else {
                return true;
            }
        }
    </script>
</body>
</html>
